Enhancing the User Experience

Up to this point, everything that we have done has been static.  What I mean by this is that once a page has been loaded in the browser, it doesn’t do anything.  To change its appearance based on user selection, it would have to make a call out to the web server and retrieve another page (or another version of the same page).  This is called making a “round-trip”, and is one of the banes of web applications.  Not only does the user experience suffer, but performance suffers as well.

As you can imagine, trying to create an application that is based on static pages is not exactly a developer’s dream.  It’s not a users dream either, especially if they are already experienced in using a GUI operating system like Microsoft Windows and applications like Microsoft Office.  So how can you create dynamic applications that do not suffer from this problem but are still based in web technologies?  The answer is Dynamic HTML, or DHTML.

Dynamic HTML (DHTML)

Dynamic HTML is a derivative of HTML that allows you to modify the contents of a page after it has already loaded.  This is very different from our previous examples that modified the content of an HTML document while it was loading, then presented the user with a completed, static page.  Using client-side scripting, you can alter the content of specified parts of the screen.  This provides you with the ability to write code that responds to user events (e.g. clicks, mouse-overs, etc.) and alter the content of the document without having to make a round-trip to the server.  Using DHTML, you can push actions to the client that you would otherwise have to handle on the server.  For example, a user could select a link, and based on that selection repopulate a table or grid.  This is more in line with what users expect from an application.

OK, Now the Downside

If DHTML sounds too good to be true, that is because it is (unfortunately!).  The biggest issue with DHTML is that it is currently only supported by IE4 or higher.  This rules out the Netscape audience entirely.  Even the W3C has yet to ratify a DHTML standard, although it is working on one (and it looks an awful lot like the Microsoft IE implementation standard).

If you are going to use DHTML, understand that you are limiting yourself to the IE market.   This rules out the majority of Internet users, so it is not the ideal choice if your intended audience in on the Internet.  The Intranet, however, is a whole different matter.  Within a company network, you will typically have more control over what the intended audience is using as far as browsers are concerned.  Since Microsoft is leading the charge on the Intranet, IE and DHTML may be an excellent choice for your internal application development environment.

Tip:	DHTML only works in IE.  Create applications that target that 
	platform affectively.  This includes (but is obviously not limited to) 
	Intranet applications.